<div class="sidebar left">
    <div class="block navigation">
        <div class="title"><strong>Tìm kiếm</strong></div>
        <div class="copy">
            <?php $timkiem = ''; if(isset($_POST['btntimkiem'])) $timkiem = $_POST['txtsearch'];?>
            <form action="<?php echo Core::site_url('quanlysach/timkiem');?>" method="post">
            <table cellpadding="0" cellspacing="0" border="0" width="100%">
                <tr>
                    <td align="center" class="tdsearch"><input type="text" name="txtsearch"/></td>
                </tr>
                <tr>
                    <td align="center"><input type="submit" name="btntimkiem" value="Tìm kiếm"/></td>
                </tr>
            </table>
            </form>
        </div>
        <div class="cap">&nbsp;</div>
    </div>
	<div class="block navigation">
        <div class="title"><strong>Danh mục sách</strong></div>
		    <div class="copy">
				<?php if(isset($menudmsach)){?>
				<ul class="listing">
					<?php while($rowdm = $menudmsach->fetch_array()){?>
					<li>
						<a href="<?php echo Core::site_url('quanlysach/danhmucID/'.$rowdm['CategoryID'].'/'.ham_loc_dau($rowdm['CategoryName']));?>"><span><?php echo $rowdm['CategoryName'];?></span></a>
					</li>
					<?php }?>
				</ul>
				<?php }?>
			</div>
		  <div class="cap">&nbsp;</div>
	</div>
	<?php if(isset($_SESSION['nguoi_dung_da_login'], $_SESSION['isAdmin'])){?>
	<div class="block navigation">
        <div class="title"><strong>Quản lý sách</strong></div>
		    <div class="copy">
				<ul class="listing">
					<li><a href="<?php echo Core::site_url('quanlysach/danhmuc');?>"><span>Quản lý danh mục</span></a></li>
					<li><a href="<?php echo Core::site_url('quanlysach/nhaxuatban');?>"><span>Quản lý nhà xuất bản</span></a></li>
					<li><a href="<?php echo Core::site_url('quanlysach/themmoisach');?>"><span>Thêm sách mới</span></a></li>
				</ul>
			</div>
		  <div class="cap">&nbsp;</div>
	</div>
	<?php }?>
</div><!-- End div.sidebar-->